3.15 \(\int \sin (c+d x) (a+b \tan (c+d x)) \, dx\)

Optimal. Leaf size=37 \[ -\frac{a \cos (c+d x)}{d}-\frac{b \sin (c+d x)}{d}+\frac{b \tanh ^{-1}(\sin (c+d x))}{d} \]

[Out]

(b*ArcTanh[Sin[c + d*x]])/d - (a*Cos[c + d*x])/d - (b*Sin[c + d*x])/d

________________________________________________________________________________________

Rubi [A]  time = 0.0357625, antiderivative size = 37, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.294, Rules used = {3517, 2638, 2592, 321, 206} \[ -\frac{a \cos (c+d x)}{d}-\frac{b \sin (c+d x)}{d}+\frac{b \tanh ^{-1}(\sin (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Int[Sin[c + d*x]*(a + b*Tan[c + d*x]),x]

[Out]

(b*ArcTanh[Sin[c + d*x]])/d - (a*Cos[c + d*x])/d - (b*Sin[c + d*x])/d

Rule 3517

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Int[Expand[Sin[e
+ f*x]^m*(a + b*Tan[e + f*x])^n, x], x] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] && IGtQ[n, 0]

Rule 2638

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 2592

Int[((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> With[{ff = FreeFactors[S
in[e + f*x], x]}, Dist[ff/f, Subst[Int[(ff*x)^(m + n)/(a^2 - ff^2*x^2)^((n + 1)/2), x], x, (a*Sin[e + f*x])/ff
], x]] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n + 1)/2]

Rule 321

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^n
)^(p + 1))/(b*(m + n*p + 1)), x] - Dist[(a*c^n*(m - n + 1))/(b*(m + n*p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \sin (c+d x) (a+b \tan (c+d x)) \, dx &=\int (a \sin (c+d x)+b \sin (c+d x) \tan (c+d x)) \, dx\\ &=a \int \sin (c+d x) \, dx+b \int \sin (c+d x) \tan (c+d x) \, dx\\ &=-\frac{a \cos (c+d x)}{d}+\frac{b \operatorname{Subst}\left (\int \frac{x^2}{1-x^2} \, dx,x,\sin (c+d x)\right )}{d}\\ &=-\frac{a \cos (c+d x)}{d}-\frac{b \sin (c+d x)}{d}+\frac{b \operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,\sin (c+d x)\right )}{d}\\ &=\frac{b \tanh ^{-1}(\sin (c+d x))}{d}-\frac{a \cos (c+d x)}{d}-\frac{b \sin (c+d x)}{d}\\ \end{align*}

Mathematica [A]  time = 0.019747, size = 48, normalized size = 1.3 \[ \frac{a \sin (c) \sin (d x)}{d}-\frac{a \cos (c) \cos (d x)}{d}-\frac{b \sin (c+d x)}{d}+\frac{b \tanh ^{-1}(\sin (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[c + d*x]*(a + b*Tan[c + d*x]),x]

[Out]

(b*ArcTanh[Sin[c + d*x]])/d - (a*Cos[c]*Cos[d*x])/d + (a*Sin[c]*Sin[d*x])/d - (b*Sin[c + d*x])/d

________________________________________________________________________________________

Maple [A]  time = 0.027, size = 45, normalized size = 1.2 \begin{align*} -{\frac{a\cos \left ( dx+c \right ) }{d}}-{\frac{b\sin \left ( dx+c \right ) }{d}}+{\frac{b\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(d*x+c)*(a+b*tan(d*x+c)),x)

[Out]

-a*cos(d*x+c)/d-b*sin(d*x+c)/d+1/d*b*ln(sec(d*x+c)+tan(d*x+c))

________________________________________________________________________________________

Maxima [A]  time = 1.52106, size = 62, normalized size = 1.68 \begin{align*} \frac{b{\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right ) - 2 \, \sin \left (d x + c\right )\right )} - 2 \, a \cos \left (d x + c\right )}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)*(a+b*tan(d*x+c)),x, algorithm="maxima")

[Out]

1/2*(b*(log(sin(d*x + c) + 1) - log(sin(d*x + c) - 1) - 2*sin(d*x + c)) - 2*a*cos(d*x + c))/d

________________________________________________________________________________________

Fricas [A]  time = 2.29999, size = 134, normalized size = 3.62 \begin{align*} -\frac{2 \, a \cos \left (d x + c\right ) - b \log \left (\sin \left (d x + c\right ) + 1\right ) + b \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, b \sin \left (d x + c\right )}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)*(a+b*tan(d*x+c)),x, algorithm="fricas")

[Out]

-1/2*(2*a*cos(d*x + c) - b*log(sin(d*x + c) + 1) + b*log(-sin(d*x + c) + 1) + 2*b*sin(d*x + c))/d

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \tan{\left (c + d x \right )}\right ) \sin{\left (c + d x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)*(a+b*tan(d*x+c)),x)

[Out]

Integral((a + b*tan(c + d*x))*sin(c + d*x), x)

________________________________________________________________________________________

Giac [B]  time = 1.65799, size = 1669, normalized size = 45.11 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)*(a+b*tan(d*x+c)),x, algorithm="giac")

[Out]

-1/2*(b*log(2*(tan(1/2*c)^2 + 1)/(tan(1/2*d*x)^4*tan(1/2*c)^2 + 2*tan(1/2*d*x)^4*tan(1/2*c) + 2*tan(1/2*d*x)^3
*tan(1/2*c)^2 + tan(1/2*d*x)^4 + 2*tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*tan(1/2*d*x)^3 + 2*tan(1/2*d*x)*tan(1/2*c)^
2 + 2*tan(1/2*d*x)^2 + tan(1/2*c)^2 - 2*tan(1/2*d*x) - 2*tan(1/2*c) + 1))*tan(1/2*d*x)^2*tan(1/2*c)^2 - b*log(
2*(tan(1/2*c)^2 + 1)/(tan(1/2*d*x)^4*tan(1/2*c)^2 - 2*tan(1/2*d*x)^4*tan(1/2*c) - 2*tan(1/2*d*x)^3*tan(1/2*c)^
2 + tan(1/2*d*x)^4 + 2*tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*tan(1/2*d*x)^3 - 2*tan(1/2*d*x)*tan(1/2*c)^2 + 2*tan(1/
2*d*x)^2 + tan(1/2*c)^2 + 2*tan(1/2*d*x) + 2*tan(1/2*c) + 1))*tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*a*tan(1/2*d*x)^2
*tan(1/2*c)^2 + b*log(2*(tan(1/2*c)^2 + 1)/(tan(1/2*d*x)^4*tan(1/2*c)^2 + 2*tan(1/2*d*x)^4*tan(1/2*c) + 2*tan(
1/2*d*x)^3*tan(1/2*c)^2 + tan(1/2*d*x)^4 + 2*tan(1/2*d*x)^2*tan(1/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